/* global axios */
import ApiClient from './ApiClient'

class InboxMembers extends ApiClient {
  constructor () {
    super('inboxMembers', { accountScoped: true })
  }

  update ({ inboxId, agentList }) {
    return axios.patch(this.url, {
      inboxId: inboxId,
      userIds: agentList,
    })
  }

  getInboxMembersByIndexId (inboxId) {
    return axios.get(`${this.url}`,{
      params: { inboxId },
    })
  }
}

export default new InboxMembers()
